<?php   
class ControllerInviterInviter extends Controller {
	
	  
    public function index() {
		$this->document->setTitle($this->config->get('config_title'));
		$this->document->setDescription($this->config->get('config_meta_description'));
		
		
		
		
		//DİL SEÇİMİ
		$this->load->language('inviter/inviter');
		$this->data['heading_title'] = $this->config->get('config_title');
		
		
		$text_strings = array(
    
                'text_davet',
				'text_gmaillink',
				'text_messagetext'
				
						);
		
		foreach ($text_strings as $text) {
			$this->data[$text] = $this->language->get($text);
		}
		
		
		
		
	//	$this->data['davet'] = $this->language->get('davet');
	//	$this->data['gmaillink'] = $this->language->get('gmaillink');
		

		
		$this->data['gmailurl']= $this->url->link('inviter/gmail');
		
		//KUPON KONTROLÜ YAPILACAK
		
		$kupon = $this->config->get('coupon_point');
				
		if(empty($kupon)){
                    
                    $kupon= 0;
               
                    
                    
                    }
                    
                    $this->data['kupon'] = $kupon;
                    
                     
                    //
                    //  $this->customer->isLogged()
                    
                     $this->data['login'] = $this->customer->isLogged();
                    
                    
                
		
		//
		
			
		
		
		
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/inviter/inviter.php')) {
			$this->template = $this->config->get('config_template') . '/template/inviter/inviter.php';
		} else {
			$this->template = 'default/template/inviter/inviter.php';
		}
		
		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);
										
		$this->response->setOutput($this->render());
	}
}
?>